Cardioid by Midpoint

Move generator point G

Locus

A = (3.18, 1.52)
B = (4.5, 1.52)
a = Line(A, B)
C = Point(a)
D = Point(a)
E = Midpoint(C, D)
c = Circle(E, D)
d = Circle(C, D)
G = Point(c)
e = Circle(G, D)
G_1 = Intersect(c, e, 2)
H = Intersect(d, e, 2)
mid = Midpoint(H, G_1)
loc1 = Locus(mid, G)
b = false
f = Segment(H, G_1)